package com.tanglongan.concurrent._basic;

public class Demo04 {
    public static void main(String[] args) {
        for (int i = 1; i <= 5; i++) {
            Thread t = new Demo04Thread(i);
            t.start();
        }
    }
}

class Demo04Thread extends Thread {
    private final int val;

    public Demo04Thread(int val) {
        this.val = val;
    }

    @Override
    public void run() {
        System.out.println("val=" + val);
    }
}
